<%@taglib uri="/WEB-INF/struts-html.tld"  prefix="html"%>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic"%>
<%@taglib uri="/WEB-INF/struts-bean.tld"  prefix="bean"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<html:form action="nilai.do?action=penilaianAdd">
    <table cellpadding="1" cellspacing="1" width="100%">
        <tr class="netral">
            <td colspan="2"><bean:message key="nilai.penilaian"/></td>
        </tr>
        <tr class="form">
            <td width="15%"><bean:message key="nilai.nama"/></td>
            <td>: <html:text property="nama" size="50"/></td>
        </tr>
        <tr class="form">
            <td><bean:message key="nilai.nilai"/></td>
            <td>: <html:text property="nilai" size="10"/></td>
        </tr>       
        <tr class="form">
            <td><bean:message key="kelas.accountKelas"/></td>
            <td>:
                <html:select property="accountKelas">
                    <logic:iterate id="listAccountKelas" name="listAccountKelas">
                        <option value="<bean:write name="listAccountKelas" property="id"/>"><bean:write name="listAccountKelas" property="kelas.workflow.namaStage"/></option>
                    </logic:iterate>
                </html:select>
            </td>
        </tr>
        <tr class="form">
            <td colspan="2" align="right"><input type="button" onclick="validate_penilaian_form()" value="${buttonAdd}"/></td>
        </tr>
    </table>
</html:form>

<table cellpadding="1" cellspacing="1" width="100%">
    <tr class="netral">
        <td colspan="7"><bean:message key="label.tabel"/> <bean:message key="nilai.penilaian"/></td>
    </tr>
    <tr class="header">
        <td><bean:message key="label.no"/></td>
        <td><bean:message key="nilai.nama"/></td>
        <td><bean:message key="nilai.nilai"/></td>      
        <td><bean:message key="kelas.accountKelas"/></td>
        <td><bean:message key="label.action"/></td>
    </tr>
    <logic:notEmpty name="listPenilaian">
        <c:forEach var="listPenilaian" items="${listPenilaian}" varStatus="row">
            <c:if test="${(row.count) % 2 == 0}"><tr class="over"></c:if>
            <c:if test="${(row.count) % 2 != 0}"><tr class="down"></c:if>
                <td width="5%"><c:out value="${row.count}"/></td>
                <td width="35%"><c:out value="${listPenilaian.nama}"/></td>
                <td width="5%"><c:out value="${listPenilaian.nilai}"/></td>
                <td width="10%"><c:out value="${listPenilaian.accountKelas.kelas.workflow.namaStage}"/></td> <td>
                    <html:link action="/nilai.do?action=penilaianEdit" paramName="listPenilaian" paramProperty="id" paramId="id" styleClass="noLink">[ <bean:message key="label.edit"/> ]</html:link>
                    <html:link action="/nilai.do?action=penilaianDelete" paramName="listPenilaian" paramProperty="id" paramId="id" styleClass="noLink">[ <bean:message key="label.delete"/> ]</html:link>
                </td>
            </tr>
        </c:forEach>
    </logic:notEmpty>
    <tr class="form">
        <td colspan="7">&nbsp;</td>
    </tr>
    <logic:empty name="listPenilaian">
        <tr class="form">
            <td colspan="7" align="center"><bean:message key="nilai.penilaian"/> <bean:message key="label.isEmpty"/></td>
        </tr>
    </logic:empty>
</table>